class yh1 {
    private String name;
    private int money;

    public void ShuRuZhangHu(String name) {
        this.name = name;
    }

    public String FanHuiZhangHu() {
        return name;
    }

    public void GengXinMoney(int money) {
        if (money < 0){
            System.out.println("输入的金额不能小于0");
        }else {
            this.money = money;
        }
    }

    public int FanHuiMoney() {
        return money;
    }

    public void print(String name, int money) {
        System.out.println("账户：" + name + "\n余额：" + money);
    }
}
public class Example04 {
    public static void main(String[] args){
        yh1 st1 = new yh1();
        st1.ShuRuZhangHu("小明");
        st1.GengXinMoney(1234578);
        st1.print(st1.FanHuiZhangHu(),st1.FanHuiMoney());
    }
}
